﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Week4Day2CraigsListApp.Models;

namespace Week4Day2CraigsListApp.Controllers
{
    public class HomeController : Controller
    {
        HomeController model = new HomeController();

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ProductDetails()
        {
            ViewBag.Message = "Your application description page.";
            Products model = new Products();

            model.ProductList = new List<Products>() 
            {
                new Products() { SellerId = 123, ProductTitle = "Pickles", ProductDescr = "Vlasic, Slightly Used, Still in date"},
                new Products() { SellerId = 345, ProductTitle = "TV", ProductDescr = "Samsung, Visible Wear, No MDI plug"},
                new Products() { SellerId = 789, ProductTitle = "Toe Jam", ProductDescr = "What were you thinking!? It's my old Teddy Bear. Sheesh, some people"},
                new Products() { SellerId = 101, ProductTitle = "'56 Chevy Pickup", ProductDescr = "No motor, no tires, no bed, no seats, will accept best offer"},
            };

            return View(model);
        }

        public ActionResult ContactSeller()
        {
            ViewBag.Message = "Your contact page.";
            Sellers model = new Sellers();

            model.SellerList = new List<Sellers>()
            {
                new Sellers() { SellerId = 123, AccountName = "Vlasic Stork", Email = "vStork@pinnaclefoods.com"},
                new Sellers() { SellerId = 345, AccountName = "Red Forman", Email = "rForman@footash.com"},
                new Sellers() { SellerId = 789, AccountName = "Theodore Roosevelt", Email = "tRoosevelt@bigstickproductions.com"},
                new Sellers() { SellerId = 101, AccountName = "Jerry Rigger", Email = "jRigger@cantfixshit.com"}
            };

            return View(model);
        }
    }
}